package com.rem.designPattern.visitor访问者;

/**
 * @author Rem
 * @date 2022-11-22
 */
public interface Person {

    void feed(Cat cat);

    void feed(Dog dog);
}

class Owner implements Person {

    @Override
    public void feed(Cat cat) {
        System.out.println("主人喂食给猫");
    }

    @Override
    public void feed(Dog dog) {
        System.out.println("主人喂食给狗");
    }
}

class Friend implements Person {

    @Override
    public void feed(Cat cat) {
        System.out.println("朋友喂食给猫");
    }

    @Override
    public void feed(Dog dog) {
        System.out.println("朋友喂食给狗");
    }
}